<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="<%=basePath%>Js/jquery.js"></script>
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/mycss/bootstrap.min.css" />
</head>
<body>
<hr><h3 align="center">开房记录</h3><hr>
	<table class="table table-bordered">

		<tr>
			<th>房间号</th>
			<th>房型</th>
			<th>价格</th>
			<th>入住人数</th>
			<th>开房办理人</th>
			<th>开房时间</th>
			<th>退房时间</th>
			<th>退房办理人</th>
			<th>备注</th>
		</tr>
		<c:forEach items="${pageInfo.list}" var="kaifanlist">
		<tr>
			<td>${kaifanlist.roomnumber}</td>
			<td>${kaifanlist.type}</td>
			<td>${kaifanlist.price}</td>
			<td>${kaifanlist.quantity}</td>
			<td>${kaifanlist.transactor}</td>
			<td>${kaifanlist.reserved2}</td>
			<c:if test="${kaifanlist.reserved3 eq null}">
			<td>未退房</td>
			</c:if>
			<c:if test="${!(kaifanlist.reserved3 eq null)}">
			<td>${kaifanlist.reserved3}</td>
			</c:if>
			
			<td>${kaifanlist.reserved1}</td>
			<td>${kaifanlist.remarks}</td>
		</tr>
		</c:forEach>

	</table>

	<div id="page1">
		<c:if test="${!pageInfo.isFirstPage }">
			<a href="${pageContext.request.contextPath }/selectKaifanRecord.do">首页</a>
			<a
				href="${pageContext.request.contextPath }/selectKaifanRecord.do?pageNum=${pageInfo.prePage}">上一页</a>
		</c:if>
		<c:if test="${!pageInfo.isLastPage }">
			<a
				href="${pageContext.request.contextPath }/selectKaifanRecord.do?pageNum=${pageInfo.nextPage}">下一页</a>
			<a
				href="${pageContext.request.contextPath }/selectKaifanRecord.do?pageNum=${pageInfo.lastPage}">末页</a>
		</c:if>
		当前页：${pageInfo.pageNum }/${pageInfo.pages }.
	</div>


</body>
</html>